package daily.play2;

public abstract class Animal {
    String name;
    int age;
    public Animal() {}
    public abstract  void eat();
}
abstract class Dog extends Animal{

}
abstract class Cat extends Animal{

}
class BsCat extends Cat{
    public BsCat(String name,int age){
        this.name = name;
        this.age = age;
    }
    @Override
    public void eat() {
        System.out.println("一个名叫"+name+"的，"+age+"岁的波斯猫，正在吃小饼干");
    }
}

class LhCat extends Cat{
    public LhCat(String name,int age){
        this.name = name;
        this.age = age;
    }
    @Override
    public void eat() {
        System.out.println("一个名叫"+name+"的，"+age+"岁的狸花猫，正在吃小鱼干");
    }
}

class TdDog extends Dog{
    public TdDog(String name,int age){
        this.name = name;
        this.age = age;
    }
    @Override
    public void eat() {
        System.out.println("一个名叫"+name+"的，"+age+"岁的泰迪，正在吃骨头，边吃边蹭");
    }
}

class HsqDog extends Dog{
    public HsqDog(String name,int age){
        this.name = name;
        this.age = age;
    }
    @Override
    public void eat() {
        System.out.println("一个名叫"+name+"的，"+age+"岁的哈士奇，正在吃骨头，边吃边拆");
    }
}
